-
-
Notifications
You must be signed in to change notification settings - Fork 37
fix: Sort releases by published_at instead of created_at #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
Deploying gitea-mirror-website with
|
| Latest commit: |
f5727da
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1b72c931.gitea-mirror-website.pages.dev |
| Branch Preview URL: | https://148-release-order-fix-for-sa.gitea-mirror-website.pages.dev |
🐳 Docker Image Built SuccessfullyYour PR image is available for testing: Image Tag: Pull and Testdocker pull ghcr.io/raylabshq/gitea-mirror:pr-151
docker run -d -p 4321:4321 -e BETTER_AUTH_SECRET=your-secret-here -e BETTER_AUTH_URL=http://localhost:4321 --name gitea-mirror-test ghcr.io/raylabshq/gitea-mirror:pr-151Docker Compose Testingservices:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:pr-151
ports:
- "4321:4321"
environment:
- BETTER_AUTH_SECRET=your-secret-here
- BETTER_AUTH_URL=http://localhost:4321
- BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:4321
📦 View in GitHub Packages |
Recommended fixes for local
|
| Name | 3.20.8 |
| Digest | sha256:008827ed2172a676b08121e21cf9db0ce08a90ee6c8a12fc374af8a56c0e496d |
| Vulnerabilities | |
| Pushed | 1 month ago |
| Size | 3.6 MB |
| Packages | 17 |
| OS | 3.20.8 |
The base image is also available under the supported tag(s): 3.20.8
Refresh base image
Rebuild the image using a newer base image version. Updating this may result in breaking changes.✅ This image version is up to date.
Change base image
| Tag | Details | Pushed | Vulnerabilities |
|---|---|---|---|
3.21Tag is preferred tag Also known as:
|
Benefits:
|
1 month ago | |
3.22Tag is latest Also known as:
|
Benefits:
|
1 month ago | |
Overview
Labels (8 changes)
-org.opencontainers.image.created=2025-11-08T05:30:35.828Z
+org.opencontainers.image.created=2025-10-22T07:56:38.047Z
-org.opencontainers.image.description=Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea/Forgejo, with a sleek Web UI and easy Docker deployment.
+org.opencontainers.image.description=Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
-org.opencontainers.image.licenses=AGPL-3.0
+org.opencontainers.image.licenses=NOASSERTION
-org.opencontainers.image.revision=f5727daedb23af1e24101b6d81815c7689c6331d
+org.opencontainers.image.revision=89fa0f343945e61d5e4a0077cc7e93a802ed56e7
-org.opencontainers.image.source=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.source=https://github.com/oven-sh/bun
-org.opencontainers.image.title=gitea-mirror
+org.opencontainers.image.title=bun
-org.opencontainers.image.url=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.url=https://github.com/oven-sh/bun
-org.opencontainers.image.version=pr-151
+org.opencontainers.image.version=1.3.1-alpine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub's Sorting:
GitHub sorts releases by published_at DESC (newest first)
The API returns them in this order by default
Our Processing:
Fetch releases from GitHub (sorted by published_at DESC)
Sort by published_at DESC, take top N releases
Reverse to process oldest → newest (so oldest gets created first in Gitea)
Create in Gitea with 1-second delays between each
Oldest release → created first → smallest created_unix
Newest release → created last → largest created_unix
Gitea displays sorted by created_unix DESC → newest first
Result: Gitea shows releases in the same order as GitHub ✅
For the Retro-Crisis repo specifically:
GitHub shows: 20250928 (Sep 28) → 20250831 (Aug 31) → 20250825 (Aug 25) → ...
Gitea will now show: 20250928 → 20250831 → 20250825 → ... (same order!)
The key fix was changing from created_at ?? published_at to published_at ?? created_at, because:
created_at = when git tag was created (commit date)
published_at = when release was published on GitHub
For repos where multiple tags share the same commit, they have the same created_at but different published_at dates. Using published_at first ensures we respect the actual release publication order, not just the tag/commit date.